#:kivy 1.0.9
#:import DisableableButton ui.disableable_button.DisableableButton
#:import NumInput ui.num_input.NumInput
#import FittableButton ui.fittable_widgets.FittableButton
#import FittableLabel ui.fittable_widgets.FittableLabel
<LoadGameScreen>:
    load_button: load_button
    input_id: input_id
    input_pin: input_pin
    BoxLayout:
        orientation: 'vertical'
        size: root.size
        BoxLayout:
            orientation: 'horizontal'
            size_hint_y: None
            height: root.height*0.1
            FittableButton:
                color: 1,0,0,1
                text: _('Back')
                on_release: root.go_back()
            DisableableButton:
                color: [0,1,0,1] if self.enabled else [1,1,1,1]
                id: load_button
                text: _('Next')
                on_release: root.on_load_pressed()
        BoxLayout:
            size_hint_y: 0.4
            Label:
                text: _('Game Id')
            NumInput:
                id: input_id
                text: root.game_id
                on_text: root.check_id()
                multiline: False
                font_size: 0.6 * self.height
                adapter: root.presenter.adapter
                on_text_validate: root.input_pin.focus = True
        BoxLayout:
            size_hint_y: 0.4
            Label:
                text: _('Pin number')
            NumInput:
                id: input_pin
                text: root.pin_code
                on_text: root.check_pin()
                multiline: False
                font_size: 0.6 * self.height
                adapter: root.presenter.adapter
                password: True
                on_text_validate: root.try_go_next()
        Label:
            size_hint_y: 0.4
            text: _('Game id\n server: ') + root.HOST
        Label:


